\\ Written by Donald T. Becker (dtbecker@prolog.net) IRC: StarDustr
// Please mail any bug reports/comments to the above address with a subject
\\ header of MCF.AMIRX.
//
\\ ** What to do with this file?
// Put this script in REXX: It will be used by MCF.AMIRX.
*/
;arg MCFenv auth Rnick junk funct junk;address value(MCFenv);DeLay=1;clp=pos('.',MCFenv);Client=substr(MCFenv,clp+1);SFP="SFP."||Client;SFPflag=getclip(value(SFP));if SFPflag='Y' then exit;call setclip(value(SFP),'Y');if funct="" then;do;"RAW PRIVMSG "Rnick" :Use %STATUS To List Status Level and available Commands.";"RAW PRIVMSG "Rnick" :Type %HELP command to get help on a command.";call setclip(value(SFP));exit;end;xl=pos(".",MCFenv);Client=substr(MCFenv,xl+1);CMC="CMDS."||Client;CmdLine=getclip(CMC);fpos=pos(funct,CmdLine);if fpos=0 then;do;call setclip(value(SFP));exit;end;Rauth=substr(CmdLine,fpos-3,2);if auth<Rauth then;do;"RAW PRIVMSG "Rnick" :You do not have authorization to use that command.";call setclip(value(SFP));exit;end;HCmd=substr(funct,2);HFName="MCF:MCF_"||HCmd||".help";if ~exists(HFName) then;do;"RAW PRIVMSG "Rnick" :Help for"d2c(2) funct d2c(2)"does not Exist.";call setclip(value(SFP));exit;end;call open("Input",HFName,"Read");do acntr=1 by 1 until eof("Input");xx=readln("Input");if xx ~="" then;do;"RAW PRIVMSG "Rnick" :" xx;address command wait DeLay sec;end;end acntr;call close("Input");call setclip(value(SFP));exit